<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<base href="<%=basePath%>" />

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>粮油集团办公自动化协作平台</title>
		<link href="style/txlz7.css" rel="stylesheet" type="text/css" />
  		<link rel="stylesheet" type="text/css" href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" />
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
		<script type="text/javascript" src="<%=basePath%>FCKeditor/fckeditor.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/system/selectusercheck.js"></script>
		<script src="<%=basePath %>js/xyTree/DivTree.js"></script>
		<script src="<%=basePath %>js/xyTree/Tree.js"></script>
		<script src="<%=basePath %>js/xyTree/Node.js"></script>
		<script src="<%=basePath %>js/xyTree/js/peoples.js"></script>
		<script src="<%=basePath %>js/xyTree/Node.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
		<script type="text/javascript">
			function submitform1()
			{
				//alert("aa");
				var contest = $("#contest").val();
				if(contest==""){
					Ext.MessageBox.show({ title:Ext.systemTitle,
					   msg: '工作日志的内容不能为空！',
					   buttons: Ext.Msg.OK,						  					
					   icon: Ext.MessageBox.INFO
					});
				}else{
			     	document.form1.submit();	
				}
		}
		</script>
	</head>
	<body onload="initselectusercheck()">
		<%
			String type = (String) request.getAttribute("type");
			String defineid = (String) request.getAttribute("define");
			Integer number = (Integer) request.getAttribute("number");
			Integer year = (Integer) request.getAttribute("year");
			String time = (String) request.getAttribute("time");
			String definename = (String)request.getAttribute("definename");
		%>
		<form action="<%=basePath%>tjsinfo/tjsoa/worklog/addWorkLog.do"
			method="post" name="form1">
			<div id="right" style="height: 93%">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td background="images/contacttitle01.gif" width="28" height="26"></td>
						<td class="td1px">
							新建工作日志
						</td>
						<td background="images/contacttitle03.gif" width="72" height="26">
							&nbsp;
						</td>
					</tr>
				</table>
				<div class="contact_content" style="overflow: scroll;">
					<div class="tab_add">
						<table width="100%" border="0" cellspacing="0" class="tab_add01">
							<tr>
								<td>
									年份:
									<select name="number">
										<%
											for(int i =2000;i<=2050;i++)
											{
										%>
											<option value="<%=i %>"><%=i %>年</option>
										<% 		
											}
										%>
									</select>	
								</td>
							</tr>
							<tr>
								<td>
									默认授权用户：
									<input readonly="readonly" name="definejubaorename" type="text" value="<%=definename +","%>" size="62" id="definejubaorename"/>
								</td>
							</tr>
							<tr>
								<td>
									请选择临时授权用户：
									<input readonly="readonly" name="jubaorename" type="text" value="" size="62" id="jubaorename"/>&nbsp;<a href="javascript:selectusercheckwinshow('jubaorenid','jubaorename','nodeid')" ><img  src="<%=basePath%>images/icon100.gif"/></a>
								</td>
							</tr>
							<tr>
								<td>
									工作日志的具体内容：
								</td>
							</tr>
							<tr>
								<td>
									<table width="99%" border="0" cellspacing="0" cellpadding="0"
										class="texttab">
										<tr>
											<td>
												<textarea name="contest" id="contest"
													style="width: 100%; height: 30px;"></textarea>
												<script type="text/javascript">
													var oFCKeditor = new FCKeditor( 'contest' ) ;
													oFCKeditor.BasePath = 'FCKeditor/' ;
													oFCKeditor.ToolbarSet = 'Default' ;
													oFCKeditor.Width = '98%' ;
													oFCKeditor.Height = '350' ;
													oFCKeditor.Value = '' ;
													oFCKeditor.ReplaceTextarea(); 
													//oFCKeditor.Create() ;
						                         </script>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<th>
									<div align="center">
										<a href="javaScript:submitform1();" ><img src="images/baocun.gif" width="71"
												height="21" border="0" /> </a>&nbsp;&nbsp;&nbsp;&nbsp;
										<a href="javascript:history.go(-1);" ><img src="images/qx.gif" width="71"
												height="21" border="0" /> </a>
									</div>
								</th>
							</tr>
						</table>
						<input type="hidden" name="typename" value="<%=type%>" />
						<input type="hidden" name="type" value="<%=type%>" />
						
						<input type="hidden" name="year" value="<%=year%>" />
						<input type="hidden" name="jubaorenid" id="jubaorenid" value="<%=defineid%>" />
						<br />
						<input type="hidden" name="time" value="<%=time%>" />
						<input id="basePath" value="<%=basePath%>" type="hidden"/>
						<br />
					</div>
				</div>
			</div>
		</form>
		
	</body>
</html>
